home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 051-075 / scopedisk74 / mpaint / readme < prev    next >
Text File  |  1995-03-19  |  11KB  |  214 lines

  1. /*============================================================================*/
  2. /*                MPaint Source Docs                      */
  3. /*============================================================================*/
  4.  
  5. General Info:
  6.  
  7. MPaint was written to learn how to use intuition and the graphics subsystem.
  8. Therefore, it is not a very good paint program. However, it does contain
  9. some routines I find usefull.
  10.  
  11. Compiled under Manx 3.6a, debuged with SDB(source level debugger)
  12.  
  13. Thanks to Jim Kent for his IFF reader/writer(although I plan to replace it
  14.     with IFFParse.lib)
  15.  
  16. Thanks to the great arp dudes for the file requester(keep up the good work).
  17.  
  18. The rest is completely original(as far as I can remember).
  19.  
  20. I still don't understand Intuition all that well, gadgets in particular.
  21. I don't understand how to change the selected status of a gadget, and have
  22. the imagery update properly. Also, if I refresh a gadget list, and there
  23. are selected complement booleans, they inverse, and I don't understand why.
  24.  
  25. MPaint frees everything it allocates, and leaves the system exactly as
  26. it found it(as far as I know, if anyone finds a memory leak, let me know).
  27.  
  28. Thanks to Bryce Nesbitt for endless hours of consultation and laughs.
  29.  
  30. /*============================================================================*/
  31.  
  32. Distribution legalese:
  33. MPaint V0.60 Copyright © 1989 Kevin T. Seghetti.  Unlimited, revokable, free,
  34. non-exclusive licence hereby granted to any sentient being to use or distribute
  35. this code without change provided this and any other copyright
  36. notices remain fully attached and are reproduced in any simultaneously
  37. distributed printed matter and with the exception that, without prior
  38. written permission, it not be utilized by any entity that has been commonly
  39. referred to as Robert W. Skyles, Skyles Electric Works, Jim Drew, Regie
  40. Warren or any organization founded by, controlled, employing or profiting
  41. any such entity, it's offspring or spouses.
  42. I make no warranties, expressed or implied, as to the usefulness of this code
  43. for any particular purpose, and the user assumes all responsibility for
  44. damages that may occur from use of said code.
  45. FISH use ok, but contact me, I may have a better version.
  46.  
  47. English translation:
  48. This code is freely redistributible, as long as it is not changed in any way.
  49. If you wish to make enhancements, that is fine,
  50. please send them to me and I will clean them up(if needed) and
  51. include them in a future release.
  52. If you have any questions, Send physical mail with a fone #, and I will get
  53. back to you.
  54.  
  55. This code is not complete, I just don't have time at the present to work on it.
  56. I may pick it up again, and add brush support, etc.
  57.  
  58. /*============================================================================*/
  59.  
  60. To use program from workbench:
  61. 1. Make a copy of workbench.
  62. 2. Delete something from the workbench(preferences#? is enough)
  63. 2. copy MPaint and MPaint.info to workbench.
  64. 3. Copy arp.library to workbench:libs.
  65. 4. Boot Workbench.
  66. 5. Click on MPaint icon
  67.  
  68. /*----------------------------------------------------------------------------*/
  69.  
  70. To use program from cli:
  71. 1. Copy arp.library to libs:
  72. 2. run MPaint
  73.  
  74. /*----------------------------------------------------------------------------*/
  75.  
  76. To Compile:
  77. 1. Get Manx 3.6a
  78. 2. unzoo MPaintSource into work directory
  79. 3. Makedir iff under work directory
  80. 4. unzoo MPaintIff into work directory
  81. 5. cd work directory
  82. 6. make
  83.  
  84. /*============================================================================*/
  85.  
  86. Routines:
  87.          Here are the headers to some usefull routines
  88. /*----------------------------------------------------------------------------*/
  89.  
  90. Requesters.c stuff:
  91. ( I think most "requesters" should be windows, and requesters saved for
  92.   immediate user interaction only(note the palette is a window,
  93.   so the only requester code I need is for auto-requesters)
  94.  
  95. /*============================================================================*/
  96. /*  DoAutoRequest: Display an autorequest                      */
  97. /*  Inputs: Win -> window to attach requestor to                  */
  98. /*        Body,Positive,Negative = pointers to text strings              */
  99. /*        Positive may be a NULL, will only display the negative option     */
  100. /*        Win may be null, will appear on the workbench screen          */
  101. /*============================================================================*/
  102.  
  103. /*============================================================================*/
  104. /*  DoMultipleAutoRequest: Display anautorequest                  */
  105. /*  Inputs: Win -> to window to attach requestor to                  */
  106. /*        Positive,Negative = pointers to text strings              */
  107. /*        Body = pointer to array of strings,with a null ptr at the end     */
  108. /*        Positive may be a NULL, will only display the negative option     */
  109. /*        Win may be null, will appear on the workbench screen          */
  110. /*============================================================================*/
  111.  
  112. menus.c stuff:             (this stuff is not general enough at this point
  113.                  but still useable)
  114.  
  115. /*============================================================================*/
  116. /*  CreateSmartMenuItems: create a list of menu items, with control          */
  117. /*  over left edge placement                              */
  118. /*  Inputs:                                      */
  119. /*        MenuText->array of pointers to text strings,              */
  120. /*        MenuKeys->array of single chars, indicating hotkeys           */
  121. /*              (if null, then no hot key for that item)                */
  122. /*        LeftEdge = # of pixels from left edge text should begin          */
  123. /*============================================================================*/
  124.  
  125. /*============================================================================*/
  126. /*  CreateMenuItems: create a list of menu items                  */
  127. /*  Inputs:                                      */
  128. /*        MenuText->array of pointers to text strings,              */
  129. /*        MenuKeys->array of single chars, indicating hotkeys           */
  130. /*              (if null, then no hot key for that item)                */
  131. /*============================================================================*/
  132.  
  133. /*============================================================================*/
  134. /* CreateMenu: Create a menu structure                          */
  135. /* Inputs: FirstItem-> first item of menuitem list(created by CreateMenuItems)*/
  136. /*       MenuName-> null terminated text string, naming menu              */
  137. /*  Bugs:                                      */
  138. /*    IRemember is hard-wired to MenuRemember                   */
  139. /*============================================================================*/
  140.  
  141. Text.c stuff: this gets used by everything else for text handling
  142.  
  143. /*============================================================================*/
  144. /*  CreateIntuiText: given a null terminated text string,              */
  145. /*  create an Intui-text structure                          */
  146. /*  Inputs: string -> null terminated(standard 'c') string                    */
  147. /*        IRemember-> remember structure pointer(see intuition manual       */
  148. /*============================================================================*/
  149.  
  150. Gadgets.c stuff:
  151.  
  152. /*============================================================================*/
  153. /*  AddGadgetsToList: Link two sets of gadgets together               */
  154. /*  Inputs: MasterGList-> gadget list                          */
  155. /*        NewGlist-> gadget list                          */
  156. /*  Description:                                  */
  157. /*        links NewGList to the end of MasterGList                  */
  158. /*============================================================================*/
  159.  
  160. /*============================================================================*/
  161. /*  CreatePropGadget: create one proportional gadget                  */
  162. /*  Inputs: LeftEdge = x offset in pixels from left edge of window          */
  163. /*        TopEdge = y offset in pixels from top of current window          */
  164. /*        Width = Width of gadget in pixels.                      */
  165. /*        Height = Height of gadget in pixels.                  */
  166. /*        GRemember-> IRemember structure pointer                  */
  167. /*        GNum = Number of gadget(GadgetID)                                 */
  168. /*============================================================================*/
  169.  
  170. /*============================================================================*/
  171. /*  CreateInvisibleGadgets: creates a vertical stack of invisible gadgets     */
  172. /*  Inputs: Count = # of gadgets to create                      */
  173. /*        LeftEdge = x offset in pixels from left edge of window          */
  174. /*        TopEdge = y offset in pixels from top of current window          */
  175. /*        Width = Width of gadget in pixels.                      */
  176. /*        Height = Height of gadget in pixels.                  */
  177. /*        GRemember-> IRemember structure pointer                  */
  178. /*        GNum = Number of gadget(GadgetID)                                 */
  179. /*============================================================================*/
  180.  
  181. /*============================================================================*/
  182. /*  CreateTextGadget: creates a button containing a single line of text       */
  183. /*  with a border drawn around it                          */
  184. /*  Inputs: text-> to null terminated text string                  */
  185. /*        LeftEdge = x offset in pixels from left edge of window          */
  186. /*        TopEdge = y offset in pixels from top of current window          */
  187. /*        GRemember-> IRemember structure pointer                  */
  188. /*        GNum = Number of gadget(GadgetID)                                 */
  189. /*  Description:                                  */
  190. /*    Will determine width from text, height is hard-wired              */
  191. /*============================================================================*/
  192.  
  193. /*============================================================================*/
  194. /*  CreateTextGadgets: creates a list of buttons containing a single line of  */
  195. /*  text with a border drawn around it                          */
  196. /*  Inputs: text-> to array of null terminated text strings              */
  197. /*        LeftEdge = x offset in pixels from left edge of window          */
  198. /*        TopEdge = y offset in pixels from top of current window          */
  199. /*        GRemember-> IRemember structure pointer                  */
  200. /*        GNum = Number of gadget(GadgetID)                                 */
  201. /*  Description:                                  */
  202. /*    Will determine width from text, height is hard-wired              */
  203. /*============================================================================*/
  204.  
  205. /*============================================================================*/
  206. /*  CreateIntGadget: creates one integer gadget                   */
  207. /*  Inputs: StartVal = number to seed gadget with, in ascii(stupid Intuition) */
  208. /*        LeftEdge = x offset in pixels from left edge of window          */
  209. /*        TopEdge = y offset in pixels from top of current window          */
  210. /*        GRemember-> IRemember structure pointer                  */
  211. /*        GNum = Number of gadget(GadgetID)                                 */
  212. /*============================================================================*/
  213.  
  214.